package com.xiamaliu.dc;

public class Test {
    public static void main(String[] args) {
        // 类适配器
        DC5 adapter = new ClassPowerAdapter();
        adapter.outputDC5V();

        // 对象适配器
        AC220 ac220 = new AC220();
        DC5 objAdapter = new ObjectAdapter(ac220);
        objAdapter.outputDC5V();

        // 接口适配器
        DC interfacePowerAdapter = new InterfacePowerAdapter(new AC220());
        interfacePowerAdapter.outputDC5V();
    }
}
